var ctx="/green-web";
var coreEnvironment = {
	namespace_root: window,
	Package: function(ns){
		var parent = coreEnvironment.namespace_root;
		var ns_a = ns.split('.');
		for (var i = 0, j = ns_a.length; i < j; i++) {
			if (!parent[ns_a[i]]) {
				parent[ns_a[i]] = {};
			} else if (i == j - 1 && parent[ns_a[i]]) {
				try {
					console.log("namespace [ " + ns + " ] is exist!");
				}catch(e){
				}
				return;
			}
			parent = parent[ns_a[i]];
		}
	},
	clone: function(obj){
		function F(){
		};
		F.prototype = obj;
		return new F;
	},
	extend: function(subClass, superClass){
		var F = function(){	};
		F.prototype = superClass.prototype;
		subClass.prototype = new F();
		subClass.prototype.constructor = subClass;
		subClass.superclass = superClass.prototype;
		if (superClass.prototype.constructor == Object.prototype.constructor) {
			superClass.prototype.constructor = superClass;
		}
	}
};
(function(){
	window.Package = coreEnvironment.Package;
	window.clone = coreEnvironment.clone;
	
	/*********加载禁止退格键和鼠标加滚动条事件*************/
	//document.write('<scr'+'ipt src="http://192.168.0.42/resource/script/ctrlMouseWheel.js"></sc'+'ript>');
	//document.write('<scr'+'ipt src="http://192.168.0.42/resource/script/forbidBackSpace.js"></sc'+'ript>');
	/*************************************/
})();
/*
var _window = function () {
	var top = window,
	test = function (name) {
		try {
			var doc = window[name].document;	// 跨域|无权限
			doc.getElementsByTagName; 			// chrome 本地安全限制
		} catch (e) {
			return false;
		};
		
		return window[name].windowFlag
		// 框架集无法显示第三方元素
		&& doc.getElementsByTagName('frameset').length === 0;
	};
	
	if (test('top')) {
		top = window.top;
	} else if (test('parent')) {
		top = window.parent;
	};
	return top;
}();
try {
	//如果是外部访问
	if(!_window.windowFlag && !window.windowFlag){
		window.location="/green-web/login/toLogin";
	}
	console.log("external reference flag [ " + _window.windowFlag + " ] is exist!");
}catch(e){
}
*/